import { CSSProperties, PropsWithChildren, useState } from 'react';
import { theme } from 'antd';
type SpanProps = {
    className?: string
    style?: CSSProperties
    onClick?: React.MouseEventHandler<HTMLSpanElement>;
}

const Span = function ({ className, style,onClick, children }: PropsWithChildren<SpanProps>) {
    const {
        token: { colorText },
    } = theme.useToken();
    const spanStyle = {
        color: colorText,
    }
    return (
        <>
            <span className={className}
            style={{...spanStyle,...style}}
            onClick={onClick}
            >{children}</span>
        </>
    )
}
export default Span